package top.milkbox.sys.modular.permission.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import top.milkbox.common.pojo.CommonEntity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldStrategy;

/**
 * 系统_权限表
 *
 * @author milkbox
 * @date 2024-10-31
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_permission")
@Schema(description = "SysPermissionEntity 系统_权限表。")
public class SysPermissionEntity extends CommonEntity implements Serializable {

    /**
     * 主键
     */
    @TableId
    @Schema(title = "主键",
            description = "主键")
    private Integer id;

    /**
     * 权限名
     */
    @Schema(title = "权限名",
            description = "权限名")
    private String name;

    /**
     * 权限值;例如接口名称、权限代码等
     */
    @Schema(title = "权限值",
            description = "权限值。例如接口名称、权限代码等")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String value;

    /**
     * 权限类型;可以按照api权限或者其他类型的权限进行分类。暂时没想好
     */
    @Schema(title = "权限类型",
            description = "权限类型。可以按照api权限或者其他类型的权限进行分类。暂时没想好")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String category;

    /**
     * 业务类型;按照业务类型进行分类，例如：角色管理、用户管理
     */
    @Schema(title = "业务类型",
            description = "业务类型。按照业务类型进行分类，例如：角色管理、用户管理")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String business;

    /**
     * 描述
     */
    @Schema(title = "描述",
            description = "描述")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String description;

}